﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Urbania.Utilities;

namespace Urbania.GUI.Elements
{
    public class SelectableWorld
    {
        protected bool mouseIsIn;
        protected bool mouseClickingOn;
        protected Rectangle bounds;

        public void Update()
        {
            if (MouseWrap.PositionWorld.X >= bounds.X && MouseWrap.PositionWorld.X <= bounds.Right)
                if (MouseWrap.PositionWorld.Y >= bounds.Y && MouseWrap.PositionWorld.Y <= bounds.Bottom)
                    mouseIsIn = true;
                else
                    mouseIsIn = false;
            else
                mouseIsIn = false;

            if (mouseIsIn && MouseWrap.wasReleased(0))
                mouseClickingOn = true;
            else
                mouseClickingOn = false;
        }
    }
}
